From af64a60466bd0a8cdcd16d68731f3fc125a62dec Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 7 Feb 2016 15:08:56 +0100 Subject: [PATCH] box gadget: Fix allocation without baseline When we don't get a baseline passed in, we want to basically center the children inside the allocation. There was an attempt in the code to do 'internal baseline alignment', but it had the side effect of moving the contents to the top when we don't get a baseline passed in. Remove it for now, this needs some more infrastructure to do properly. https://bugzilla.gnome.org/show_bug.cgi?id=761363 --- gtk/gtkboxgadget.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/gtk/gtkboxgadget.c b/gtk/gtkboxgadget.c index 1adbcb6774..e16ddbd2ff 100644 --- a/gtk/gtkboxgadget.c +++ b/gtk/gtkboxgadget.c @@ -387,27 +387,6 @@ gtk_box_gadget_allocate (GtkCssGadget *gadget, { gtk_box_gadget_distribute (GTK_BOX_GADGET (gadget), allocation->height, allocation->width, sizes); - if (baseline < 0) - { - for (i = 0; i < priv->children->len; i++) - { - GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, i); - - if (gtk_box_gadget_child_get_align (GTK_BOX_GADGET (gadget), child) == GTK_ALIGN_BASELINE) - { - gint child_min, child_nat; - gint child_baseline_min, child_baseline_nat; - - gtk_box_gadget_measure_child (child->object, - GTK_ORIENTATION_VERTICAL, - sizes[i].minimum_size, - &child_min, &child_nat, - &child_baseline_min, &child_baseline_nat); - baseline = MAX (baseline, child_baseline_min); - } - } - } - for (i = 0; i < priv->children->len; i++) { GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, i); -- 2.30.2